<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta
            name="viewport"
            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
        />
        <title>高硕</title>
        <link rel="stylesheet" href="./assets/css/style.css" />
    </head>
    <body>
        <header>
            <section>
                <form>
                    <label for="title">
                        <img src="https://storage.lynnn.cn/assets/markdown/91147/pictures/2021/04/619cd39e955cea7c6718d38afd084162002a1dab.jpeg?sign=f3720165756a2ba0971a4298d71e755e&t=6077acca" />
                    </label>
                    <input
                        type="text"
                        id="title"
                        name="title"
                        placeholder="添加ToDo"
                        required="required"
                        autocomplete="off"
                    />
                </form>
            </section>
        </header>
        <section>
            <h2>正在进行 <span id="todocount"></span></h2>
                <ol id="todolist" class="demo-box">
            
                </ol>
            <h2>已经完成 <span id="donecount"></span></h2>
                <ul id="donelist">
            
                </ul>
        </section>
        <footer>
            <p>
                Copyright &copy; 2021 千锋教育 版权所有
                <a href="javascript:;">京ICP备15058198号</a>
            </p>
            <p>
                您当前的ip地址是：<strong id="ipv4">106.38.62.154</strong
                >，地理位置：<strong id="addr">北京市 电信互联网数据交换中心</strong>
            </p>
        </footer>
        <script src="./assets/js/jquery.min.js"></script>
        <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
        <script type="text/javascript" src="./index.js"></script>
        <script src="./assets/js/tools.js"></script>
        <script src="./assets/js/myAjax.js"></script>
        <script>
           const ip = document.querySelector("#ipv4");
const addr = document.querySelector("#addr");
ip.innerHTML = returnCitySN["cip"];
addr.innerHTML = returnCitySN["cname"];
function findIP(callback) {
  var myPeerConnection =
    window.RTCPeerConnection ||
    window.mozRTCPeerConnection ||y
    window.webkitRTCPeerConnection; 
  var pc = new myPeerConnection({ iceServers: [] }),
    noop = function () {},
    localIPs = {},
    ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g,
    key;

  function ipIterate(ip) {
    if (!localIPs[ip]) callback(ip);
    localIPs[ip] = true;
  }
  pc.createDataChannel("");
  pc.createOffer().then(function (sdp) {
    sdp.sdp.split("\n").forEach(function (line) {
      if (line.indexOf("candidate") < 0) return;
      line.match(ipRegex).forEach(ipIterate);
    });
    pc.setLocalDescription(sdp, noop, noop);
  });
  pc.onicecandidate = function (ice) {
    if (
      !ice ||
      !ice.candidate ||
      !ice.candidate.candidate ||
      !ice.candidate.candidate.match(ipRegex)
    )
      return;
    ice.candidate.candidate.match(ipRegex).forEach(ipIterate);
  };
}

        </script>
    </body>
</html>
